public class Num2496 {
    //2496. 数组中字符串的最大值
    public int maximumValue(String[] strs) {
        int maxLen = 0;
        for (String str : strs) {
            if (check(str)) {
                //非纯数字
                maxLen = Math.max(maxLen, str.length());
            } else {
                //纯数字
                Integer num = Integer.parseInt(str);
                maxLen = Math.max(maxLen, num);
            }
        }
        return maxLen;
    }

    private boolean check(String str) {
        for (char c : str.toCharArray()) {
            if (c - '0' > 9 || c - '0' < 0) {
                return true;
            }
        }
        return false;
    }
}
